#打印日志的方法
import logging
import yagmail
def log_set():
    #基本配置
    logging.basicConfig(level=logging.DEBUG,format="%(levelname)s-%(asctime)s-%(message)s",filename="log.txt")
#发邮件
def send_email(a):
    mail=yagmail.SMTP(user='3545381542@qq.com',password='olmjqpfedtencjja',host='smtp.qq.com')
    mail.send(to='3545381542@qq.com',subject='测试报告',contents='今天的测试内容',attachments=a)